package main

import "fmt"

func main() {
	result := 0
	index := 0
	for i := 0; i <= 10; i++ {
		index, result = fibonacci(i)
		fmt.Printf("fibonacci(%d) is: %d index: %d\n", i, result, index)
	}
}

func fibonacci(n int) (index, res int) {
	index = n
	if n <= 1 {
		res = 1
	} else {
		_, r1 := fibonacci(n - 1)
		_, r2 := fibonacci(n - 2)
		res = r1 + r2
	}

	return
}
